import translate from 'translate'
import chalk from 'chalk'
import { pinyin } from 'pinyin-pro'
/** 批量中→英，失败留空，CLI 不炸 */
export async function translateBatch(
  texts: string[]
): Promise<Record<string, string>> {
  const record: Record<string, string> = {}
  for (const t of texts) {
    record[t] = pinyin(t, { toneType: 'none', separator: ' ' }) + ' (CN)'
  }
  return record
}
